/*
 * Copyright (c) 2023, 2023,yzc.cn All rights reserved.
 *
 */
package cn.yzc.service.impl;

import cn.yzc.mapper.TaskMapper;
import cn.yzc.pojo.Task;
import cn.yzc.service.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>Project: SpringPro - TaskServiceImpl</p>
 * <p>Powered by yzc On 2023-10-25 16:27:16</p>
 * <p>描述：<p>
 *
 * @author yzc [yzc0415@126.com]
 * @version 1.0
 * @since 17
 */
@Service
public class TaskServiceImpl implements TaskService {

    @Autowired
    TaskMapper taskMapper;

    /**
     * 增加任务
     *
     * @param task
     * @return
     */
    @Override
    @Transactional
    public int insertTask(Task task) {

        return taskMapper.insertTask(task);
    }

    @Override
    public List<Task> queryTask(Task task) {
        return taskMapper.queryTask(task);
    }

    @Override
    public int delTask(int[] ids) {

        return taskMapper.delTask(ids);
    }

    @Override
    public Task queryById(int id) {
        return taskMapper.queryById(id);
    }
}
